// 
// Decompiled by Procyon v0.5.36
// 

package com.orange.boot.dev2.controller;

import org.springframework.web.bind.annotation.GetMapping;
import io.swagger.annotations.ApiOperation;
import java.io.Serializable;
import com.orange.boot.dev2.entity.Expert;
import com.orange.boot.utils.R;
import javax.annotation.Resource;
import com.orange.boot.dev2.service.ExpertService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping({"/dev2/expert"})
@Api(
        tags = {"在线专家"}
)
public class ExpertController {
    @Resource
    ExpertService expertService;

    public ExpertController() {
    }

    @ApiOperation("专家详情")
    @GetMapping({"/get"})
    public R get(Long id) {
        Expert expert = (Expert)this.expertService.getById(id);
        return expert != null ? R.ok().data("expert", expert) : R.error().message("查询失败");
    }
}
